<?php defined('IN_PHPCMS') or exit('No permission resources.'); ?><?php include template('member', 'header'); ?>
<div class="layui-member-center">
  <?php include template('member', 'left'); ?>
  <div class="layui-member-info">
  <div class="layui-message">
  	<div class="layui-title"><h3>系统消息</h3></div>
  	<table class="layui-table">
    	<thead>
        	<tr>
          		<th>标 题</th>
            	<th width="20%">发送时间</th>
        	</tr>
    	</thead>
    	<tbody>
			<?php $n=1;if(is_array($infos)) foreach($infos AS $info) { ?> 
			<tr>
				<td><a class="layui-read" data-href="<?php echo APP_PATH;?>index.php?m=message&c=index&a=read_group&group_id=<?php echo $info['id'];?>" href="javascript:;"><?php if($status[$info['id']]==0) { ?><font color=red><b><?php echo $info['subject'];?></b></font><?php } else { ?><?php echo $info['subject'];?><?php } ?></a></td>
 				<td width="20%" align="center"><?php echo date('Y-m-d H:i:s',$info['inputtime']);?> </td>
			</tr>
			<?php $n++;}unset($n); ?>
    	</tbody>
  	</table>
  </div>
  <div class="layui-pagebox">
    <div class="layui-laypage"><?php echo $pages;?></div>
  </div>
  </div>
</div>
<script>
layui.use('jquery', function(){
	var $ = layui.jquery;
	$('.layui-read').on('click', function(){
		var href = $(this).attr('data-href');
		console.log(href);
      	layer.open({
        	type: 2,
        	title: '消息详情',
        	shadeClose: true,
        	shade: 0.8,
        	area: ['300px', '400px'],
        	move:false,
        	scrollbar: false,
        	content: href
      	});
	});
})
</script>
<?php include template('member', 'footer'); ?>

